package com.zzy;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;

/** 使用 war 包发布  */
@ComponentScan("com.zzy")
@EntityScan("com.zzy.model")
@EnableCaching
@EnableAutoConfiguration
//@EnableDiscoveryClient
//@SpringBootApplication(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})
@SpringBootApplication

public class ProviderFileWar extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(ProviderFileWar.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(ProviderFileWar.class);
    }
}
